home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!news
- From: austern@isolde.mti.sgi.com (Matt Austern)
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Performance: C vs. C++
- Followup-To: comp.lang.c++,comp.lang.c
- Date: 09 Feb 1996 21:36:16 GMT
- Organization: SGI
- Message-ID: <AUSTERN.96Feb9133616@isolde.mti.sgi.com>
- References: <30F6BAAC.12B5@iastate.edu> <4da9pn$a45@news.bridge.net>
- <4dnpl2$c8g@classic.iinet.com.au> <3105E9DC.1BE3@enermet.fi>
- <DLr46y.7rH@txnews.amd.com> <4elk5l$3f2q@yuma.ACNS.ColoState.EDU>
- <pronet01.31.003EB1E6@indirect.com> <3117F980.7890@hpato.aus.hp.com>
- <4fgd62$asb@gaia.ns.utk.edu>
- Reply-To: austern@mti.sgi.com
- NNTP-Posting-Host: isolde.mti.sgi.com
- In-reply-to: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN's message of 9 Feb 1996 21:09:22 GMT
-
- In article <4fgd62$asb@gaia.ns.utk.edu> mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel) writes:
-
- > This calling "member functions in for loops" business.
- > The problem is that C++ offers neither
- >
- > 1) A linguistic mechanism to say "this is not a dispatched
- > pointer". I think it's a flaw to forcibly connect
- > reference semantics with dispatchability.
- >
- > 2) Closed compilation environments where the entire program
- > is known to the compiler at once.
-
- Point 1 is indeed a language issue; it's debatable whether or not it's
- a genuine flaw. C++ already has one mechanism for avoiding dispatch
- (declaring the method non-virtual), and I'm not sure that it would be
- justified to add a second mechanism to do the same thing. There's a
- nonzero cost of adding features, even if each feature is individually
- a good idea.
-
- Point 2 isn't a language issue, but an implementation issue: some C++
- implementations do in fact perform cross-module optimization. The
- language itself permits separate compilation, but doesn't require it.
- --
- Matt Austern
- SGI: MTI Compilers Group
- austern@isolde.mti.sgi.com
-